import {reactive,onMounted} from 'vue'

export function useMouse(){
    const mouseMove =reactive({
        x:0,
        y:0
    })
    onMounted(()=>{
        document.addEventListener('mousemove',move)
    })
    const move=(e)=>{
            mouseMove.x=e.pageX
            mouseMove.y=e.pageY
        }
    return mouseMove
}